<template>
    <div>
        <div class="app-container flex-box page-ercode-index">
            <div class="ercode-wrap">
                <div class="leftarea">
                    <div class="photo-wrap photo-wrap-ercode">
                        <img :src="yingpin_erweima_url" alt=""  />
                    </div>
                    <div class="button-wrap button-wrap-ercode">
                        <a :href="yingpin_erweima_url" download="ercode" style="text-decoration:none;"><button>下载应聘二维码</button></a>
                    </div>
                </div>

                <div class="rightarea">
                    <div class="photo-wrap photo-wrap-haibao">
                        <img :src="yingpin_haibao_url" alt=""  />
                    </div>
                    <div class="button-wrap button-wrap-haibao">
                        <a :href="yingpin_haibao_url" download="ercode" style="text-decoration:none;"><button>下载应聘海报</button></a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
	import waves from '@/directive/waves' // 水波纹指令
	import API from '@/api'
	import Http from '@/http'
	import Store from '@/store'
	import Msg from '@/utils/msg'
	import Utils from '@/utils/common'
	import Validator from '@/utils/validate'
	import Auth from '@/auth'
	import _ from 'underscore'
	import Qiniu from '@/utils/qiniu'
	import {mapGetters} from 'vuex'
	import cityDate from '@/utils/city.js'

	export default {
		directives: {waves},
		data() {
			return {
				yingpin_erweima_url:"",
				yingpin_haibao_url:""
			}
		},
		computed: {},
		components: {},
		created() {
			this.loadImg()
		},
		methods: {
			loadImg() {
				this.listLoading = true
				Http.getModel(API.get_ruzhi_ercode, {}, false).then((json) => {
					this.loading = false
					if (json.code == 0) {
						var url = json.data;
						this.yingpin_erweima_url = url;
					}
				})
				Http.getModel(API.get_ruzhi_haibao, {}, false).then((json) => {
					this.loading = false
					if (json.code == 0) {
						var url = json.data;
						this.yingpin_haibao_url = url;
					}
				})
			},

		}
	}
</script>
<style lang="scss" rel="stylesheet/scss" scoped>
    .page-ercode-index {
        padding: 30px;
        overflow: auto; }
    .page-ercode-index .ercode-wrap {
        width: 800px;
        display: flex;
        justify-content: space-between; }
    .page-ercode-index .ercode-wrap .leftarea {
        width: 38%; }
    .page-ercode-index .ercode-wrap .leftarea .photo-wrap {
        width: 90%;
        margin: 10px auto; }
    .page-ercode-index .ercode-wrap .leftarea .photo-wrap img {
        display: block;
        width: 100%;
        height: auto;
        margin: 0 auto; }
    .page-ercode-index .ercode-wrap .leftarea .button-wrap {
        margin: 20px; }
    .page-ercode-index .ercode-wrap .leftarea .button-wrap button {
        width: 200px;
        height: 42px;
        line-height: 42px;
        text-align: center;
        background: #1296db;
        color: #fff;
        outline: none;
        display: block;
        margin: 0 auto;
        font-size:14px;
        border: 0; }
    .page-ercode-index .ercode-wrap .rightarea {
        width: 58%; }
    .page-ercode-index .ercode-wrap .rightarea .photo-wrap {
        width: 90%;
        margin: 10px auto; }
    .page-ercode-index .ercode-wrap .rightarea .photo-wrap img {
        display: block;
        width: 100%;
        height: auto;
        margin: 0 auto; }
    .page-ercode-index .ercode-wrap .rightarea .button-wrap {
        margin: 20px; }
    .page-ercode-index .ercode-wrap .rightarea .button-wrap button {
        width: 200px;
        height: 42px;
        line-height: 42px;
        text-align: center;
        background: #1296db;
        color: #fff;
        outline: none;
        font-size:14px;
        display: block;
        margin: 0 auto;
        border: 0; }
</style>
